<template>
	<view class="sponsor">
		<view class="tit">抽奖赞助商</view>
		<view class="con">
			<view class="list">
				<view class="left">
					<image :src="sponsor.photo" alt=""></image>
				</view>
				<view class="mid">
					<text class="top">{{sponsor.name}}</text>
					<text>{{sponsor.introduce}}</text>
				</view>
				<view class="right"><button @click="goWeb()" class="btn">去体验</button>
				</view>
			</view>
		</view>
		<web-view v-if="showWeb" :src="sponsor.url"></web-view>
	</view>
</template>
<script>
	export default {
		props: {
			sponsor: {
				type: Object,
				default: () => ({})
			}
		},
		data() {
			return {
				showWeb: false
			}
		},
		actived() {
			this.showWeb = false;
		},
		methods: {
			goWeb() {
				this.showWeb = true

			}
		}
	}
</script>
<style lang="scss" scoped>
	.sponsor {
		padding: 20rpx 20rpx 0 20rpx;
		background-color: #fff;

		.tit {
			padding-bottom: 20rpx;
			border-bottom: 1px solid #DDD;
			font-weight: bold;
			font-size: 28rpx;
		}

		.con {
			padding: 20rpx 0;

			.list {
				display: flex;

				.left {
					image {
						width: 117rpx;
						height: 91rpx;
					}
				}

				.mid {
					display: flex;
					flex-direction: column;
					font-size: 24rpx;
					color: #868686;
					margin-left: 20rpx;
					flex: 1;

					.top {
						color: #000;
						margin: 10rpx 0;
					}
				}

				.right {
					button {
						width: 123rpx;
						height: 52rpx;
						line-height: 52rpx;
						background: linear-gradient(180deg, #356AFA 0%, #34B8FD 100%);
						border-radius: 8rpx;
						font-size: 24rpx;
						color: #fff;
						padding: 0;
						text-align: center;
						margin-top: 20rpx;
					}
				}
			}

		}
	}
</style>